<template>
  <!-- 分页 -->
  <el-pagination
    class="pagination"
    background
    :current-page="currentPage"
    layout="total,prev, pager, next"
    :total="total"
    @current-change="currentPageChange"
  />
</template>

<script>
export default {
  props: {
    total: {
      type: Number,
      default: 0
    },
    currentPage: {
      type: Number,
      default:1
    },
  },
  data() {
    return {
      // currentPage: 1
    }
  },

  created() {

  },

  methods: {
    currentPageChange(page) {
      this.$emit('changCurrentPage', page)
    }
  }
}
</script>

<style scoped lang="scss">
.pagination {
  text-align: right;
  padding-top:40px;
}

</style>
